3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
A picking ID style determines the picking ID of an object in a model. A picking ID is an arbitrary 32-bit integer that you can use to determine which object was selected by a pick operation. For example, you can assign different picking IDs to the eight corners of a cube; when the user selects a corner, you can inspect the corner's picking ID (by looking at the pickID field of the hit data structure associated with that corner) to determine which corner was selected.
See the chapter "Pick Objects" for complete information about picking.
You assign a picking ID to a geometric object by creating a picking ID style having the desired picking ID and then submitting that style object before submitting the geometric object. See "Managing Picking ID Styles" for a description of the functions you can use to create and manipulate picking ID styles.
QuickDraw 3D does not perform any validation to ensure that the picking IDs you assign to objects in a model are unique. It is your application's responsibility to generate unique picking IDs.
Previous | QD3D Book | Overview | Chapter Contents | Next |